﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<EnterpriseManagement.Models.BasicInformationModel>>" %>
<%@ Import Namespace="EnterpriseManagement.Models"%>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
<% BasicInformationModel basicinformation =Model.First(); %>

<div id="searchresult">
<table class ="noframe" style ="margin-left:10%">
    <tr>
        <td><%:Html.LabelFor(model => basicinformation.EmployeeId)%></td>  
        <td><%:Html.LabelFor(model => basicinformation.Name)%></td>
        <td><%:Html.LabelFor(model => basicinformation.Sex)%></td>
        <td><%:Html.LabelFor(model => basicinformation.Birthday)%></td>
        <td><%:Html.LabelFor(model => basicinformation.Position)%></td>
        <td><%:Html.LabelFor(model => basicinformation.HiredDate)%></td>
        <td><%:Html.LabelFor(model => basicinformation.LeaveDate)%></td>
        <td><%:Html.LabelFor(model => basicinformation.EmployeeStatus)%></td>        
        <td><%:Html.LabelFor(model => basicinformation.Email)%></td>  
        <td><%:Html.LabelFor(model => basicinformation.GraduateSchool)%></td>  
        <td><%:Html.LabelFor(model => basicinformation.Major)%></td>  
        <td><%:Html.LabelFor(model => basicinformation.Mobile)%></td>  
    </tr>

<%foreach (BasicInformationModel model in Model)
  { %>
    <tr>
        <td class="display-field"><%:model.EmployeeId%></td>  
        <td class="display-field"><%:model.Name%></td>
        <td class="display-field"><%:model.Sex%></td>
        <td class="display-field"><%:model.Birthday%></td>
        <td class="display-field"><%:model.Position%></td>
        <td class="display-field"><%:model.HiredDate%></td>
        <td class="display-field"><%:model.LeaveDate%></td>
        <td class="display-field"><%:model.EmployeeStatus%></td>        
        <td class="display-field"><%:model.Email%></td>  
        <td class="display-field"><%:model.GraduateSchool%></td>  
        <td class="display-field"><%:model.Major%></td>  
        <td class="display-field"><%:model.Mobile%></td>  
        <td id="tdnoline"><%:Ajax.ActionLink("修改", "EditEmployee", new { id = model.EmployeeId }, new AjaxOptions { UpdateTargetId = "editemployee", HttpMethod = "GET" })%></td>
     </tr>
<%} %>

</table>
   <div style ="text-align:center">
   <%=Ajax.Pager(Model,new PagerOptions(){PageIndexParameterName="id"},
                               new AjaxOptions() { UpdateTargetId = "searchresult" })%>

   </div>
<%--<%} %>--%>

<div id="editemployee">

</div>

</div>